import React from "react";
import { useShallow } from "zustand/react/shallow";
import { useUserStore } from "@/store/user";

const UserName: React.FC = () => {
  const { userInfo } = useUserStore(useShallow((state) => ({ userInfo: state.userInfo })));

  return <span className="username">{userInfo?.name}</span>;
};

export default UserName;
